//
//  DoctorViewController.m
//  yinsiwenzhen
//
//  Created by appying_wxj on 15/1/4.
//  Copyright (c) 2015年 4gread. All rights reserved.
//

#import "DoctorViewController.h"

@interface DoctorViewController ()

@end

@implementation DoctorViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    
    self.title = @"医生资料";
    [self.navigationController.navigationBar
     setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
                             [UIColor colorWithRed:0.44 green:0.44 blue:0.44 alpha:1], NSForegroundColorAttributeName,
                             [UIFont systemFontOfSize:20],
                             NSFontAttributeName,nil]];
    self.view.backgroundColor = [UIColor whiteColor];
    [self initdoctorUI];
}
// 创建医生详细介绍的界面
-(void)initdoctorUI{
    
    UIScrollView *mainScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, kScreen_Width, kScreen_Height)];
    mainScrollView.backgroundColor = [UIColor clearColor];
    [mainScrollView setPagingEnabled:NO];
    [self.view addSubview:mainScrollView];
    
    
    UIImageView *doctorImage = [[UIImageView alloc] init];
//    doctorImage.backgroundColor = [UIColor colorWithRed:0.31 green:0.89 blue:0.95 alpha:1];
    doctorImage.image = [UIImage imageNamed:@"doctorTwo.jpg"];
    doctorImage.contentMode = UIViewContentModeScaleAspectFit;
    doctorImage.frame = CGRectMake((kScreen_Width-110)/2, 5, 110, 140);
    [mainScrollView addSubview:doctorImage];
    
    NSArray *nameArray = [NSArray arrayWithObjects:@"【姓名】",@"【职称】",@"【主治】",@"【详细介绍】", nil];
    for (int i = 0 ; i < 4; i++) {
        UILabel *titleLab = [[UILabel alloc] init];
        titleLab.frame = CGRectMake(10, 150+i*(20+40), 120, 20);
        titleLab.text = [nameArray objectAtIndex:i];
        titleLab.textAlignment = NSTextAlignmentLeft;
        titleLab.textColor = [UIColor colorWithRed:0 green:0.66 blue:0.9 alpha:1];
        [mainScrollView addSubview:titleLab];
    }
    
    NSArray *detailArray = [NSArray arrayWithObjects:@"佟丽娅",@"老年示范病房主任教授 主任医师 硕士导师",@"消化系统疾病，肠胃病，肝硬化，便秘，老年医学，老年胃肠病", nil];
    for (int i = 0 ; i < 3; i++) {
        UILabel *detailLab = [[UILabel alloc] init];
        detailLab.frame = CGRectMake(90, 150+i*(30+30), kScreen_Width-100, 30);
        detailLab.text = [detailArray objectAtIndex:i];
        detailLab.textColor = [UIColor colorWithRed:0.4 green:0.4 blue:0.4 alpha:1];
        detailLab.numberOfLines = 0;
        [detailLab sizeToFit];
        detailLab.font = [UIFont systemFontOfSize:16];
        detailLab.textAlignment = NSTextAlignmentLeft;
        [mainScrollView addSubview:detailLab];
    }
    
    UITextView *detailText = [[UITextView alloc] initWithFrame:CGRectMake(10, 350, kScreen_Width-20, 300)];
    detailText.text = @"刘晓红，消化内科教授、主任医师，医学博士、理学博士，硕士导师，老年示范病房主任，1982年毕业于北京医科大学医疗系，1990年北京医科大学第三医院消化科获医学博士学位。。。";
    detailText.textColor = [UIColor colorWithRed:0.4 green:0.4 blue:0.4 alpha:1];
    detailText.textAlignment = NSTextAlignmentLeft;
    detailText.font = [UIFont systemFontOfSize:16];
    [mainScrollView addSubview:detailText];
    
    
    
    
    
    
    
    
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
